<template>
    <div class="logOut">
        <header>
            <h3>设置</h3>
        </header>
        <img src="../assets/img/logout-bg.jpg" alt="">
        <footer>
            <h3 @click="logOut">注销账号</h3>
            <h3 @click="goBack">行,再看看</h3>
        </footer>
    </div>
</template>

<script>
import { Dialog } from 'vant';

export default {
    data() {
        return {
            color: "",
        }
    },
    methods: {
        logOut() {
            Dialog.confirm({
                message: '确定退出账号吗？',
            })
                .then(() => {
                    // on confirm
                    localStorage.removeItem("AUTO_TOKEN")
                    this.$router.push({ path: '/login' })
                })
                .catch(() => {
                    // on cancel
                });
        },
        goBack(){
            this.$router.push({ path: '/my' })
        }
    }
}
</script>

<style lang="less" scoped>
@import url(../common/less/varible.less);

.logOut {
    header{
        width: 100%;
        display: flex;
        justify-content: center;
        padding: 10px 0;
        background-color: @color;
        h3{
            font-size: 30px;
            letter-spacing: 15px;
            transform: translateX(15px);
        }
    }
    width: 100%;
    height: 665px;
    margin: 0px auto;
    position: relative;

    img {
        width: 380px;
        height: 550px;
    }

    footer {
        width: 100%;
        height: 60px;
        background-color: @color;
        position: absolute;
        bottom: 0;
        left: 0;
        display: flex;
        align-items: center;

        h3 {
            font-size: 30px;
            width: 150px;
            margin: 0 auto;
            text-align: center;
            font-family: @myfont;
            padding-bottom: 5px;
            border-bottom: 5px solid @borderColor;
        }

    }




}
</style>